#include<bits/stdc++.h>
using namespace std;
typedef long double ld;
const int N=1e6+10;
struct ok{
	ld a,b,y;
	void init() {scanf("%Lf%Lf",&a,&b);}
	bool operator <(const ok &A) const{return y<A.y;}
}a[N],b[N];
int n;
ld ans;
ld pw(ld x) {return x*x;}
bool check(ld x)
{
	for(ld m=1.0*n/2-1;m<=1.0*n/2+1;m+=0.5)
	{
		if(m<1||m>n) continue;
		bool flag=1;
		for(int i=1;i<=n;i++)
			if(m>=i)
			{
				if(pw(m-i+1)+a[i].y>x) {flag=0;break;}
			}
			else
			{
				if(pw(i-m)+a[i].y>x) {flag=0;break;}
			}
		if(flag) return 1;
	}
	return 0;
}
ld Sqrt(ld x)
{
	ld l=0,r=1e9,mid,res=0;
	while(r-l>=1e-12)
	{
		mid=(l+r)/2;
		if(mid*mid<=x) res=mid,l=mid;
		else r=mid;
	}
	return res;
}
int main()
{
	freopen("temple.in","r",stdin);
	freopen("temple.out","w",stdout);
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		a[i].init();
		if(a[i].a>a[i].b) swap(a[i].a,a[i].b);
		a[i].y=pw(a[i].a)+pw(a[i].b/2);
	}
	sort(a+1,a+n+1);
	for(int i=1,l=1,r=n;i<=n;i+=2)
	{
		b[l++]=a[i];
		if(l<r) b[r--]=a[i+1];
	}
	for(int i=1;i<=n;i++) a[i]=b[i];
	ld l=0,r=1e18,mid;
	while(r-l>=1e-12)
	{
		mid=(l+r)/2;
		if(check(mid)) r=ans=mid;
		else l=mid;
	}
	ans=Sqrt(ans);
	printf("%.10Lf\n",ans);
	fclose(stdin);fclose(stdout);
	return 0;
}
